<script>
export default {
  beforeCreate() {
    console.log('child before create!');
  },
  created() {
    console.log('child created!');
  },
  beforeMount() {
    console.log('child before mount!');
  },
  render(h) {
    console.log('child render!');
    return (
      <div>
        <h1>孩子</h1>
      </div>
    );
  },
  mounted() {
    console.log('child mounted');
    this.$bus.$on('parentMounted', function() {
      console.log('父组件挂载完毕');
    })
  },
};
</script>

父组件先初始化 -> 父渲染完毕 -> 子组件开始初始化 -> 子组件挂载完毕 -> 父组件挂载完毕
<style>
div {
  text-align: center;
}
</style>
